# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=libwhich
pkgver=1.2.0
pkgrel=1
pkgdesc='Like `which`, for dynamic libraries'
arch=(loong64 x86_64)
url='https://github.com/vtjnash/libwhich'
license=(MIT)
depends=(glibc)
source=(https://github.com/vtjnash/libwhich/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('aa13017310f3f9b008267283c155992bb7e0f6002dafaf82e6f0dbd270c18b0a')

build() {
  cd $pkgname-$pkgver
  make
}

package() {
  cd $pkgname-$pkgver
  install -Dm755 libwhich -t "$pkgdir"/usr/bin
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
